//
//  DPushStateView.m
//  生日趴-框架
//
//  Created by douglas on 2018/11/16.
//  Copyright © 2018 Zhang. All rights reserved.
//

#import "DPushStateView.h"
#import "Masonry.h"
@implementation DPushStateView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/
- (UIImageView *)pushIcon {
    if (!_pushIcon) {
        _pushIcon = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 30, 30)];
        [self addSubview:_pushIcon];
        [_pushIcon mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(@(10));
            make.bottom.equalTo(@(-10));
            make.height.equalTo(@(30));
            make.width.equalTo(@(30));
        }];
    }
    return _pushIcon;
}
- (UILabel *)pushLable {
    if (!_pushLable) {
        _pushLable = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 0, 0)];
        _pushLable.textColor = [UIColor whiteColor];
        _pushLable.font = [UIFont systemFontOfSize:16];
        [self addSubview:_pushLable];
        [_pushLable mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.pushIcon.mas_right).offset(10);
            make.bottom.equalTo(@(-10));
            make.height.equalTo(@(30));
            make.right.equalTo(@(10));
        }];
    }
    return _pushLable;
}

@end
